import configAdminApiConfig from '@/core/config/generated/apiconfig/configAdminApiConfig'
import serverApiMockUtils from '../../utils/serverApiMockUtils'
import mockProdServerUtils from '../../utils/mockUtils'
import { MockMethod } from 'vite-plugin-mock'
import Mock from 'mockjs'
import CfgConfigResponse from '@/core/config/generated/types/model/response/CfgConfigResponse'

const content: CfgConfigResponse[] = []
for (let i = 0; i < 10; i++) {
	content.push({
		id: i.toString(),
		cfgAppId: i.toString(),
		title: `title_配置_${i.toString()}`,
		remark: `remark_配置_${i.toString()}`,
		key: `key_配置_${i.toString()}`,
		value: `value_配置_${i.toString()}`,
		deleteFlag: '0',
		createTime: new Date().getTime().toString(),
		updateTime: new Date().getTime().toString(),
		rowVersion: 1,
	} as CfgConfigResponse)
}

const mockList: MockMethod[] = [...serverApiMockUtils.getDefaultServerApi(configAdminApiConfig.cfgConfig, content)]

mockProdServerUtils.addMockList(...mockList)

export const items = content
